$(function () {

    //路径combobox option
    var ljOptions = {
        required: true,
        editable: false,
        onSelect: function (record) {
            $.post($.webPath() + '/organ/ljwh/bgljInfo', {'ljId': record.id}, function (data) {
                //经营机构
                $("#bgjh_jyjg_id").val(data["jyjg.id"]);
                $("#bgjh_jyjg_qc").val(data["jyjg.qc"]);
                //计划区队
                $("#bgjh_jhdw").bgjhlrjhdwcombobox({required: true,
                    ljId: data['lj.id'],
                    onSelect: function (record) {
                        $("#bgjh_sm").val(generateDescription(record));
                    }});
            });
        }
    };
    //===============================
    //============主信息===============
    //===============================
    //路径
    var ljCombobox = $("#bgjhlrForm :text[name='bgjh.lj.id']").ljcombobox($("#bgjhlr_content_bgjh_zggsId").val(), "7", ljOptions);
    //===============================================
    //=================此页面所使用的函数==================
    //===============================================
    function generateDescription(record) {
        var date = $("#bgjhlr_content_date").val();
        var jhdw = record.qc;
        var sm = jhdw + "物资计划（" + date + "）";
        return sm;
    }


});
